//提供调用发送短信验证码接口的函数
import request from '@/utils/request.js'
export const sendSmsCodeApi=(phone)=>{
    const params = new URLSearchParams();
    params.append("phone",phone);
    return request.post('/message/send',params);
}
export const sendInnerMessage=(id,content,startTime,endTime)=>{
    const requestBody ={
        id:id,
        content:content,
        startTime : startTime,
        endTime : endTime
    }
    return request.put('/sse/sendInnerMessage',requestBody);
}
export const getMessages=(id)=>{
    const params = new URLSearchParams();
    params.append("id",id);
    return request.post('/sse/getMessage',params);
}


